<?php echo '<?xml version="1.0" encoding="UTF-8" ?>'."\n"; // have to echo() this ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<?php foreach ($bricaboxes->result() as $bricabox): ?>
	<sitemap>
		<loc>http://<?php echo $bricabox->subdomain; ?>.bricabox.com/sitemap.xml</loc>
		<lastmod><?php echo date('Y-m-d', time()); ?></lastmod>
	</sitemap>
	<?php endforeach; ?>
</sitemapindex>